<!DOCTYPE html>
<html>

<head>
    <title>登录 - 民兵工作过程管控</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${ctxPath}/assets/common/layui/css/layui.css"/>
    <link rel="stylesheet" href="${ctxPath}/assets/common/css/login.css" media="all">
    <style>
        input:-webkit-autofill {
            -webkit-text-fill-color: #999999 !important;
            transition: background-color 5000s ease-in-out 0s;
        }
        body {
            background-image: url("${ctxPath}/assets/common/images/login_bg.jpg");
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-size: 100%;
            background-color: #f0f2f5;
        }

        .login-header {
            color: rgba(0, 0, 0, .85) !important;
        }

        .login-footer {
            color: rgba(0, 0, 0, 0.7) !important;
        }

        .login-footer a {
            color: rgba(0, 0, 0, 0.7) !important;
        }

        .login-footer a:hover {
            color: rgba(0, 0, 0, 0.4) !important;
        }
        .title{
            width: 407px;
            height: 40px;
            line-height: 40px;
            font-size: 32px;
            font-weight: bold;
            text-align: center;
            color: white;
            letter-spacing: 5px;
            margin: 0 auto;
            margin-bottom: 20px;
        }

        .login_body {
            width:400px;
            height: 270px;
            margin: 0 auto;
            margin-top:200px;
            background-color: transparent;
        }
        form{
            background-image: url("${ctxPath}/assets/common/images/login_main_bg.png");
            background-position: center;
            background-repeat: no-repeat;
            background-size: 100%;
            padding: 30px;

        }
        .input_div{
            width: 260px;
            height: 35px;
            border: 1px solid #02ffff;
            margin: 0 auto;
            margin-top: 28px;
            background-position: 5px center;
            background-repeat: no-repeat;
            padding-left: 40px;
            background-size: 20px;
        }
        .input_div input{
            height: 35px;
            width: 280px;
            border: none;
            line-height: 26px;
            background: none !important;
            color: white;
            font-size: 16px;
        }
        .username_div{
            background-image: url("${ctxPath}/assets/common/images/login_user.png");
        }
        .password_div{
            background-image: url("${ctxPath}/assets/common/images/login_pass.png");
        }

        .login_btn{
            display: block;
            border: none;
            width: 300px;
            height: 35px;
            font-size: 20px;
            color: white;
            margin: 0 auto;
            background-color: #00a2d4;
            margin-top: 30px;
        }
    </style>
    <script>
        if (window != top)
            top.location.replace(location.href);
    </script>
</head>

<body>


    <div class="login_body">
            <div class="title">民兵工作过程管控</div>
            <form  action="${ctxPath}/login" method="post">

                    <div class="input_div username_div">
                        <input name="username" type="text" placeholder="请输入用户名" lay-verify="required"/>
                    </div>

                    <div class="input_div password_div">
                        <input name="password" type="password" placeholder="请输入密码" lay-verify="required"/>
                    </div>
<!--                    <div class="layui-form-item" pane="">-->
<!--                        <label class="layui-form-label" lay-tips="7天内免登陆">记住我</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="radio" name="remember" value="on" title="是" checked="">-->
<!--                            <input type="radio" name="remember" value="off" title="否" >-->
<!--                        </div>-->
<!--                    </div>-->




                    <button lay-filter="login-submit" class="login_btn" lay-submit>登 录</button>

            </form>
    </div>

    <div class="login-footer">
        <p>© 2020 山东省军区版权所有</p>
    </div>

@/* 加入contextPath属性和session超时的配置 */
<script type="text/javascript">
    var Feng = {
        ctxPath: "",
        addCtx: function (ctx) {
            if (this.ctxPath === "") {
                this.ctxPath = ctx;
            }
        }
    };
    Feng.addCtx("${ctxPath}");
</script>
<script type="text/javascript" src="${ctxPath}/assets/common/layui/layui.js"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js"></script>

<script>
    layui.use(['layer', 'form','ax'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var $ax = layui.ax;

        // 表单提交
        form.on('submit(login-submit)', function (obj) {
            return true;
        });

        // 图形验证码
        // $('.login-captcha').click(function () {
        //     this.src = this.src + '?t=' + (new Date).getTime();
        // });

        var errorMsg = "${tips!}";
        if (errorMsg) {
            layer.msg(errorMsg, {icon: 5, anim: 6});
        }

        //忘记密码
        $("#forget").click(function(){
            window.location.href = "${ctxPath}/mgr/forget";
        });
        //学员注册
        $("#register").click(function(){
            window.location.href = "${ctxPath}/student/to_register";
        });


    });
</script>


</body>
</html>